<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ include file="../common.jsp"%>
<%@ page import="cn.firstsoft.firstframe.admin.PropertyFile"%>
<%@ page import="org.springside.core.Constants" %>
<%@ page import="java.io.*,java.util.*" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%
	String initPersonAllSql = PropertyFile.readValue("easconfig.properties", "eas.initPersonAllSql");
	if (initPersonAllSql == null) initPersonAllSql = "";
	String detailInfo = PropertyFile.readValue("easconfig.properties", "eas.detailInfo");
	String positionPOS = PropertyFile.readValue("easconfig.properties","eas.positionPOS");
%>
<html>
<head>
<title>管理控制台 - 环境设置 - EAS集成</title>
<%@ include file="/common/meta2.jsp"%>
<link href="../style.css" type="text/css" rel=stylesheet>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
EAS集成主要工作：<br>
1、使用集成版本的EASOA安装，安装后已经将部分集成数据初始化了，使用EAS的管理控制台进行EASOA的部署<br>
2、修改同步的SQL，一般情况下不需要修改，特别情况例如：需要用户名加工号，或者同步繁体字段等，这些SQL写在<a href="../application/file_download.jsp?filePath=<%=(System.getProperty("oa_application.config")+"/easconfig.properties") %>&fileName=easconfig.properties">easconfig.properties</a><br>
3、EAS集成主要的设置在EAS系统中，EAS与OA安装在同一个机器上，从EAS5.4之后，安装后将不在修改EAS中的easWebConfig.xml和yiruan_oa.jsp文件，除非不是安装在同一台机器上，或者OA的端口发生了修改！<br>
4、EAS Portal的集成需要到数据中心上，向EAS数据库插入SQL可以实现<br>
	<table width="100%" align="center" >
		<TR>
			<TH class=listViewPaginationTdS1  align=left colSpan=4>
			设置EAS集成参数
			</TH>
		</TR>
		<tr>
			<td class=dataLabel width="15%" align="right">是否进行EAS集成：</td>
			<td class=dataField>
				<select name="provider" size=1 onchange="changeProvider(this.options[this.selectedIndex].value+'Option');">
					<option value="false">不集成</option>
					<option value="true" <%="true".equals(PropertyFile.readValue("firstframe.properties", "plugins.eas"))?"selected":"" %>>集成</option>
				</select>
			</td>
			<td align="left">当前系统集成状态：<%="true".equals(Constants.EAS)?"集成":"未集成" %></td>
		</tr>
		<script language="javascript">
			function changeProvider(p) {
				var dis = <%="true".equals(PropertyFile.readValue("firstframe.properties", "plugins.eas"))?"false":"true" %>;

				document.getElementById('falseOption').style.display='none';
				document.getElementById('trueOption').style.display='none';

				if (p == 'falseOption') {
					//if (!dis) {
						document.getElementById(p).style.display='inline';
					//}
				} else {
					document.getElementById(p).style.display='inline';
				}
			}
		</script>
		<tr id="falseOption" style="display:<%="true".equals(PropertyFile.readValue("firstframe.properties", "plugins.eas"))?"none":"inline" %>">
			<td class=dataLabel width="15%" align="right"></td>
			<td class=dataField>
				<form action="eas_set.jsp" method="post">
				<input type="hidden" name="provider" value="false">
				<input type="submit" name="subt" value="&nbsp;提&nbsp;&nbsp;交&nbsp;">
				<input type="reset" name="rest" value="&nbsp;重&nbsp;&nbsp;置&nbsp;">
				</form>
			</td>
			<td align="left">提交则取消EAS集成</td>
		</tr>
		<tr id="trueOption" style="display:<%="true".equals(PropertyFile.readValue("firstframe.properties", "plugins.eas"))?"inline":"none" %>">
		<td colspan="3"><table>
		<form action="eas_set.jsp" method="post">
		<tr>
			<td class=dataLabel width="15%" align="right">集成方式：</td>
			<td><select id="integrationStyle" name="integrationStyle">
					<option value="1" <%="1".equals(PropertyFile.readValue("firstframe.properties", "plugins.eas.integrationStyle"))?"selected":"" %>>弹开式</option>
					<option value="2" <%="2".equals(PropertyFile.readValue("firstframe.properties", "plugins.eas.integrationStyle"))?"selected":"" %>>嵌入式</option>
				</select></td>
			<td></td>
		</tr>
		<tr>
			<td class=dataLabel width="15%" align="right">EAS集成参数：</td>
			<td class=dataField>

				<input type="hidden" name="provider" value="true">
				是否同步非用户职员：
				<input type="radio" name="initPersonAllSql" value="false" <%="".equals(initPersonAllSql)?"checked":"" %>>不同步

				<input type="radio" name="initPersonAllSql" value="true" <%=!"".equals(initPersonAllSql)?"checked":"" %>>同步<br>
				&nbsp;&nbsp;&nbsp;&nbsp;是否同步联系信息：
				<input type="radio" name="detailInfo" value="false" <%="false".equals(detailInfo)?"checked":"" %> />不同步
				<input type="radio" name="detailInfo" value="true" <%="true".equals(detailInfo)?"checked":"" %> />同步<br>
				是否同步职位顺序号：
				<input type="radio" name="positionPOS" value="false" <%="false".equals(positionPOS)?"checked":"" %> />不同步
				<input type="radio" name="positionPOS" value="true" <%="true".equals(positionPOS)?"checked":"" %> />同步<br>
				<input type="submit" name="subt" value="&nbsp;提&nbsp;&nbsp;交&nbsp;">
				<input type="reset" name="rest" value="&nbsp;重&nbsp;&nbsp;置&nbsp;">

			</td>
			<td align="left">
				配置文件：<a href="../application/file_download.jsp?filePath=<%=(System.getProperty("oa_application.config")+"/easconfig.properties") %>&fileName=easconfig.properties">easconfig.properties</a>
			</td>
		</tr>
		</form>
		</table></td>
		</tr>
	</table>
</body>
</html>
